Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/WG-260 add map control bar #303

Merged
merged 40 commits into from
Jan 24, 2025
Merged

Conversation

nathanfranklin
Copy link
Collaborator

@nathanfranklin nathanfranklin commented Jan 15, 2025

Overview:

This PR introduces a control bar at the top of the map to align with the behavior of the Angular Hazmapper app:

  • Show map name
  • Displays the associated DesignSafe project name.
  • Shows a spinner while features are being loaded.

It also handles different errors that could occur.

Additional Hooks:

  • useMapMousePosition: Tracks the mouse position on the map.
  • useCurrentFeatures: Updated to indicate when new features are loading.
  • useProjectUsers: Retrieves map project users.

PR Status:

  • Ready.

Related Jira tickets:

Summary of Changes:

Testing Steps:

Example routes are provided that correspond to maps on staging (i.e. GeoapiBackendEnvironment.Staging in src/secret_local.ts )

UI Photos:


Error getting map:
Screenshot 2025-01-21 at 11 22 55 AM


Map doesn't exist

Screenshot 2025-01-21 at 4 21 35 PM


Map is private and user isn't a member of the project:

Screenshot 2025-01-21 at 4 26 18 PM


Public map (not logged in)
Screenshot 2025-01-21 at 11 22 23 AM

Public map (logged in)

Screenshot 2025-01-21 at 11 21 44 AM

Private map view
Screenshot 2025-01-21 at 11 21 35 AM

Notes:

@nathanfranklin nathanfranklin requested review from sophia-massie, rstijerina and shayanaijaz and removed request for sophia-massie and rstijerina January 21, 2025 17:51
Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested maps and LGTM.
Not critical but should the MapControlBar have a larger font like prod?

Follow on:
I'm seeing an issue for a public map where the Add Asset from DesignSafe button is appearing when it should not. See here Not a bug from your code, but the handling of if the AssetButton should show or not is faulty.

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanfranklin
Copy link
Collaborator Author

Tested maps and LGTM. Not critical but should the MapControlBar have a larger font like prod?
Added note for this to look at in Feb

Follow on: I'm seeing an issue for a public map where the Add Asset from DesignSafe button is appearing when it should not. See here a bug from your code, but the handling of if the AssetButton should show or not is faulty.

fixed in separate PR.

@nathanfranklin nathanfranklin merged commit 8e8c6de into main Jan 24, 2025
5 checks passed
@nathanfranklin nathanfranklin deleted the task/WG-260-add-map-control-bar branch January 24, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants